Check out and check in

Remember that you checked in the project to the Repository from the SSWE, see Checking In the project from the SSWE, so the view to the project files is read only. To modify a file, you first need to check it out.
In the Project Editor
The file which you will modify is

complex.C , which belongs to the complexlib.shared project. To check out complex.C :

In the Project Tree, make sure that the

complexlib.shared project is checkmarked, so that you can see its files.
In the File List, highlight complex.C by clicking on it once.
Choose File > Check Out....

- In the Check Out dialog, press Exclusive Lock.
  In the File List, notice that
complex.C is now displayed in bold typeface, which indicates that it is writable.
Select the Lockers check box at the bottom of the Project Editor. This check box allows you to see which users have locked which files.
If you scroll to the right of the File List, you will notice that the entry for complex.C now looks similar to this:

- Clear the Lockers check box.
- To load the, now writable,
complex.C file into the Source Editor, double-click on it in the File List.
In the Source Editor
All we want to do here is to make a modification, so that a newer version of the file exists.

Enter a comment in the file.
Notice that the Source Editor now indicates that the file has been modified.

- On Unix, the icon in the upper-left corner of the Source Editor indicates that the file has been modified.
- On Windows NT/95, the write permissions of the loaded file and its status are indicated in the title bar of the Source Editor.

Save

complex.C by choosing File > Save.
Close the Source Editor.
Checking in the file
Once you are satisfied with the changes you have made to a file, you check it back in. The rest of the team then has access to the modified file (after the shared working environments have been updated - see next chapter).

- Note that "being satisfied with changes", above, means that, at the very least, your code is compilable. Do NOT check in untested, possibly uncompilable, code!
Since you only added a comment to the checked out file, it is safe to check it back in.

In the Project Editor
You can check in files either from the Project Editor or the Source Editor. Here, you will use the Project Editor (the menu command is the same in both tools).

In the File List, make sure

complex.C is highlighted. This is the file you checked out, as you can see by the bold typeface.
Choose File > Check In....
In the Check In dialog, enter a comment in the Comment field and press Ok.
You can leave the Version field blank, because SNiFF+ will automatically increment the version number to 1.2. Also leave the Change Set field blank; this is usually only used for multiple files.

| Note
| Notice that the file name no longer appears in bold typeface because it is now read-only.

- To look at the history of
complex.C , highlight the file in the File List and select the History check box at the bottom of the Project Editor.
Notice that the HEAD version of the file is now version 1.2 .
Take a look at the history of some of the other project files. Since you have not modified those files since checking them in, their HEAD version is still 1.1 .
Clear the History check box.